home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / Display Manager / Compiler & Runtime Files / • New universal header files • / AIncludes / Video.a < prev   
Encoding:
Text File  |  1995-07-18  |  30.5 KB  |  646 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Video.a
  3. ;
  4. ;    Contains:    Video Driver Interfaces.
  5. ;
  6. ;     Version:    Technology:    System 7.5
  7. ;                 Package:    Universal Interfaces in “Display Manager Development Kit” (post ETO #18)
  8. ;     Copyright:    © 1984-1995 by Apple Computer, Inc.
  9. ;                 All rights reserved.
  10. ;     Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  11. ;                 stack.  Include the file and version information (from above)
  12. ;                 in the problem description and send to:
  13. ;                     Internet:    apple.bugs@applelink.apple.com
  14. ;                     AppleLink:    APPLE.BUGS
  15. ;
  16. ;
  17.  
  18.     IF &TYPE('__VIDEO__') = 'UNDEFINED' THEN
  19. __VIDEO__ SET 1
  20.  
  21.  
  22.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  23.     include 'Quickdraw.a'
  24.     ENDIF
  25. ;        include 'Types.a'                                            ;
  26. ;            include 'ConditionalMacros.a'                            ;
  27. ;        include 'MixedMode.a'                                        ;
  28. ;        include 'QuickdrawText.a'                                    ;
  29.  
  30. mBaseOffset                        EQU        1                    ;Id of mBaseOffset.
  31. mRowBytes                        EQU        2                    ;Video sResource parameter Id's 
  32. mBounds                            EQU        3                    ;Video sResource parameter Id's 
  33. mVersion                        EQU        4                    ;Video sResource parameter Id's 
  34. mHRes                            EQU        5                    ;Video sResource parameter Id's 
  35. mVRes                            EQU        6                    ;Video sResource parameter Id's 
  36. mPixelType                        EQU        7                    ;Video sResource parameter Id's 
  37. mPixelSize                        EQU        8                    ;Video sResource parameter Id's 
  38. mCmpCount                        EQU        9                    ;Video sResource parameter Id's 
  39. mCmpSize                        EQU        10                    ;Video sResource parameter Id's 
  40. mPlaneBytes                        EQU        11                    ;Video sResource parameter Id's 
  41. mVertRefRate                    EQU        14                    ;Video sResource parameter Id's 
  42. mVidParams                        EQU        1                    ;Video parameter block id.
  43. mTable                            EQU        2                    ;Offset to the table.
  44. mPageCnt                        EQU        3                    ;Number of pages
  45. mDevType                        EQU        4                    ;Device Type
  46. oneBitMode                        EQU        128                    ;Id of OneBitMode Parameter list.
  47. twoBitMode                        EQU        129                    ;Id of TwoBitMode Parameter list.
  48. fourBitMode                        EQU        130                    ;Id of FourBitMode Parameter list.
  49. eightBitMode                    EQU        131                    ;Id of EightBitMode Parameter list.
  50.  
  51. sixteenBitMode                    EQU        132                    ;Id of SixteenBitMode Parameter list.
  52. thirtyTwoBitMode                EQU        133                    ;Id of ThirtyTwoBitMode Parameter list.
  53. firstVidMode                    EQU        128                    ;The new, better way to do the above. 
  54. secondVidMode                    EQU        129                    ; QuickDraw only supports six video 
  55. thirdVidMode                    EQU        130                    ; at this time.      
  56. fourthVidMode                    EQU        131
  57. fifthVidMode                    EQU        132
  58. sixthVidMode                    EQU        133
  59. spGammaDir                        EQU        64
  60. spVidNamesDir                    EQU        65
  61.  
  62. ; csTimingFormat values in VDTimingInfo 
  63. ; look in the declaration rom for timing info 
  64. kDeclROMtables                    EQU        'decl'
  65.  
  66. ; Timing mode constants for Display Manager MultiMode support
  67. ;    Corresponding    .h equates are in Video.h
  68. ;                    .a equates are in Video.a
  69. ;                    .r equates are in DepVideoEqu.r
  70. ;    
  71. ;    The first enum is the old names (for compatibility).
  72. ;    The second enum is the new names.
  73. ;
  74. timingApple12                    EQU        130                    ;  512x384 (60 Hz) Rubik timing.
  75. timingApple12x                    EQU        135                    ;  560x384 (60 Hz) Rubik-560 timing.
  76. timingApple13                    EQU        140                    ;  640x480 (67 Hz) HR timing.
  77. timingApple13x                    EQU        145                    ;  640x400 (67 Hz) HR-400 timing.
  78. timingAppleVGA                    EQU        150                    ;  640x480  (60 Hz) VGA timing.
  79. timingApple15                    EQU        160                    ;  640x870 (75 Hz) FPD timing.
  80. timingApple15x                    EQU        165                    ;  640x818 (75 Hz) FPD-818 timing.
  81. timingApple16                    EQU        170                    ;  832x624 (75 Hz) GoldFish timing.
  82. timingAppleSVGA                    EQU        180                    ;  800x600  (56 Hz) SVGA timing.
  83. timingApple1Ka                    EQU        190                    ; 1024x768 (60 Hz) VESA 1K-60Hz timing.
  84. timingApple1Kb                    EQU        200                    ; 1024x768 (70 Hz) VESA 1K-70Hz timing.
  85. timingApple19                    EQU        210                    ; 1024x768  (75 Hz) Apple 19" RGB.
  86. timingApple21                    EQU        220                    ; 1152x870  (75 Hz) Apple 21" RGB.
  87.  
  88. timingInvalid                    EQU        0                    ; Unknown timing… force user to confirm.
  89. timingApple_512x384_60hz        EQU        130                    ;  512x384  (60 Hz) Rubik timing.
  90. timingApple_560x384_60hz        EQU        135                    ;  560x384  (60 Hz) Rubik-560 timing.
  91. timingApple_640x480_67hz        EQU        140                    ;  640x480  (67 Hz) HR timing.
  92. timingApple_640x400_67hz        EQU        145                    ;  640x400  (67 Hz) HR-400 timing.
  93. timingVESA_640x480_60hz            EQU        150                    ;  640x480  (60 Hz) VGA timing.
  94. timingApple_640x870_75hz        EQU        160                    ;  640x870  (75 Hz) FPD timing.
  95. timingApple_640x818_75hz        EQU        165                    ;  640x818  (75 Hz) FPD-818 timing.
  96. timingApple_832x624_75hz        EQU        170                    ;  832x624  (75 Hz) GoldFish timing.
  97. timingVESA_800x600_56hz            EQU        180                    ;  800x600  (56 Hz) SVGA timing.
  98. timingVESA_800x600_60hz            EQU        182                    ;  800x600  (60 Hz) SVGA timing.
  99. timingVESA_800x600_72hz            EQU        184                    ;  800x600  (72 Hz) SVGA timing.
  100. timingVESA_800x600_75hz            EQU        186                    ;  800x600  (75 Hz) SVGA timing.
  101. timingVESA_1024x768_60hz        EQU        190                    ; 1024x768  (60 Hz) VESA 1K-60Hz timing.
  102. timingVESA_1024x768_70hz        EQU        200                    ; 1024x768  (70 Hz) VESA 1K-70Hz timing.
  103. timingVESA_1024x768_75hz        EQU        204                    ; 1024x768  (75 Hz) VESA 1K-70Hz timing (very similar to timingApple_1024x768_75hz).
  104. timingApple_1024x768_75hz        EQU        210                    ; 1024x768  (75 Hz) Apple 19" RGB.
  105. timingApple_1152x870_75hz        EQU        220                    ; 1152x870  (75 Hz) Apple 21" RGB.
  106. timingAppleNTSC_ST                EQU        230                    ;  512x384  (60 Hz, interlaced, non-convolved).
  107. timingAppleNTSC_FF                EQU        232                    ;  640x480  (60 Hz, interlaced, non-convolved).
  108. timingAppleNTSC_STconv            EQU        234                    ;  512x384  (60 Hz, interlaced, convolved).
  109. timingAppleNTSC_FFconv            EQU        236                    ;  640x480  (60 Hz, interlaced, convolved).
  110. timingApplePAL_ST                EQU        238                    ;  640x480  (50 Hz, interlaced, non-convolved).
  111. timingApplePAL_FF                EQU        240                    ;  768x576  (50 Hz, interlaced, non-convolved).
  112. timingApplePAL_STconv            EQU        242                    ;  640x480  (50 Hz, interlaced, convolved).
  113. timingApplePAL_FFconv            EQU        244                    ;  768x576  (50 Hz, interlaced, convolved).
  114. timingVESA_1280x960_75hz        EQU        250                    ; 1280x960  (75 Hz)
  115. timingVESA_1280x1024_60hz        EQU        260                    ; 1280x1024 (60 Hz)
  116. timingVESA_1280x1024_75hz        EQU        262                    ; 1280x1024 (75 Hz)
  117. timingVESA_1600x1200_60hz        EQU        280                    ; 1600x1200 (60 Hz) VESA proposed timing.
  118. timingVESA_1600x1200_65hz        EQU        282                    ; 1600x1200 (65 Hz) VESA proposed timing.
  119. timingVESA_1600x1200_70hz        EQU        284                    ; 1600x1200 (70 Hz) VESA proposed timing.
  120. timingVESA_1600x1200_75hz        EQU        286                    ; 1600x1200 (75 Hz) VESA proposed timing.
  121. timingVESA_1600x1200_80hz        EQU        288                    ; 1600x1200 (80 Hz) VESA proposed timing (pixel clock is 216 Mhz dot clock).
  122.  
  123. ; csConnectFlags values in VDDisplayConnectInfo 
  124. kAllModesValid                    EQU        0                    ; All modes not trimmed by primary init are good close enough to try 
  125. kAllModesSafe                    EQU        1                    ; All modes not trimmed by primary init are know to be safe 
  126. kReportsTagging                    EQU        2                    ; Can detect tagged displays (to identify smart monitors) 
  127. kHasDirectConnection            EQU        3                    ; True implies that driver can talk directly to device (e.g. serial data link via sense lines) 
  128. kIsMonoDev                        EQU        4                    ; Says whether there’s an RGB (0) or Monochrome (1) connection. 
  129. kUncertainConnection            EQU        5                    ; There may not be a display (no sense lines?). 
  130. kTaggingInfoNonStandard            EQU        6                    ; Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). 
  131. kReportsDDCConnection            EQU        7                    ; Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). 
  132. kHasDDCConnection                EQU        8                    ; Card has ddc connect now. 
  133.  
  134. ; csDisplayType values in VDDisplayConnectInfo 
  135. kUnknownConnect                    EQU        1                    ; Not sure how we’ll use this, but seems like a good idea. 
  136. kPanelConnect                    EQU        2                    ; For use with fixed-in-place LCD panels. 
  137. kPanelTFTConnect                EQU        2                    ; Alias for kPanelConnect 
  138. kFixedModeCRTConnect            EQU        3                    ;  For use with fixed-mode (i.e., very limited range) displays. 
  139. kMultiModeCRT1Connect            EQU        4                    ; 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe 
  140. kMultiModeCRT2Connect            EQU        5                    ; 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe 
  141. kMultiModeCRT3Connect            EQU        6                    ; 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain 
  142. kMultiModeCRT4Connect            EQU        7                    ; Expansion to large multi mode (not yet used) 
  143. kModelessConnect                EQU        8                    ; Expansion to modeless model (not yet used) 
  144. kFullPageConnect                EQU        9                    ; 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) 
  145. kVGAConnect                        EQU        10                    ; 640x480 VGA default -- question everything else 
  146. kNTSCConnect                    EQU        11                    ; NTSC ST (default), FF, STconv, FFconv 
  147. kPALConnect                        EQU        12                    ; PAL ST (default), FF, STconv, FFconv 
  148. kHRConnect                        EQU        13                    ; Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) 
  149. kPanelFSTNConnect                EQU        14                    ; For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels 
  150. kMonoTwoPageConnect                EQU        15                    ; 1152x870 Apple color two-page display 
  151. kColorTwoPageConnect            EQU        16                    ; 1152x870 Apple B&W two-page display 
  152. kColor16Connect                    EQU        17                    ; 832x624 Apple B&W two-page display 
  153. kColor19Connect                    EQU        18                    ; 1024x768 Apple B&W two-page display 
  154.  
  155. ; csTimingFlags values in VDTimingInfoRec 
  156. kModeValid                        EQU        0                    ; Says that this mode should NOT be trimmed. 
  157. kModeSafe                        EQU        1                    ; This mode does not need confirmation 
  158. kModeDefault                    EQU        2                    ; This is the default mode for this type of connection 
  159. kModeShowNow                    EQU        3                    ; This mode should always be shown (even though it may require a confirm) 
  160. kModeNotResize                    EQU        4                    ; This mode should not be used to resize the display (eg. mode selects a different connector on card) 
  161. kModeRequiresPan                EQU        5                    ; This mode has more pixels than are actually displayed 
  162. kModeInterlaced                    EQU        6                    ; This mode is interlaced (single pixel lines look bad). 
  163.  
  164. ; csResolutionFlags bit flags for VDResolutionInfoRec 
  165. kResolutionHasMultipleDepthSizes EQU        0                    ; Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) 
  166.  
  167. ;    Power Mode constants for VDPowerStateRec.powerState.    
  168. kAVPowerOff                        EQU        0
  169. kAVPowerStandby                    EQU        1
  170. kAVPowerSuspend                    EQU        2
  171. kAVPowerOn                        EQU        3
  172.  
  173. ;    Power Mode masks and bits for VDPowerStateRec.powerFlags.    
  174. kPowerStateNeedsRefresh            EQU        0
  175. kPowerStateNeedsRefreshMask        EQU        (1 << 0)
  176.  
  177. ; Control Codes 
  178. cscReset                        EQU        0
  179. cscKillIO                        EQU        1
  180. cscSetMode                        EQU        2
  181. cscSetEntries                    EQU        3
  182. cscSetGamma                        EQU        4
  183. cscGrayPage                        EQU        5
  184. cscGrayScreen                    EQU        5
  185. cscSetGray                        EQU        6
  186. cscSetInterrupt                    EQU        7
  187. cscDirectSetEntries                EQU        8
  188. cscSetDefaultMode                EQU        9
  189. cscSwitchMode                    EQU        10
  190. cscSetSync                        EQU        11
  191. cscSavePreferredConfiguration    EQU        16
  192. cscSetHardwareCursor            EQU        22
  193. cscDrawHardwareCursor            EQU        23
  194. cscSetConvolution                EQU        24
  195. cscSetPowerState                EQU        25
  196. cscUnusedCall                    EQU        127                    ; This call used to expend the scrn resource.  Its imbedded data contains more control info 
  197.  
  198. ; Status Codes 
  199. cscGetMode                        EQU        2
  200. cscGetEntries                    EQU        3
  201. cscGetPageCnt                    EQU        4
  202. cscGetPages                        EQU        4                    ; This is what C&D 2 calls it. 
  203. cscGetPageBase                    EQU        5
  204. cscGetBaseAddr                    EQU        5                    ; This is what C&D 2 calls it. 
  205. cscGetGray                        EQU        6
  206. cscGetInterrupt                    EQU        7
  207. cscGetGamma                        EQU        8
  208. cscGetDefaultMode                EQU        9
  209. cscGetCurMode                    EQU        10
  210. cscGetSync                        EQU        11
  211. cscGetConnection                EQU        12                    ; Return information about the connection to the display 
  212. cscGetModeTiming                EQU        13                    ; Return timing info for a mode 
  213. cscGetModeBaseAddress            EQU        14                    ; Return base address information about a particular mode 
  214. cscGetScanProc                    EQU        15                    ; QuickTime scan chasing routine 
  215. cscGetPreferredConfiguration    EQU        16
  216. cscGetNextResolution            EQU        17
  217. cscGetVideoParameters            EQU        18
  218. cscGetGammaInfoList                EQU        20
  219. cscRetrieveGammaTable            EQU        21
  220. cscSupportsHardwareCursor        EQU        22
  221. cscGetHardwareCursorDrawState    EQU        23
  222. cscGetConvolution                EQU        24
  223. cscGetPowerState                EQU        25
  224.  
  225. ; Bit definitions for the Get/Set Sync call
  226. kDisableHorizontalSyncBit        EQU        0
  227. kDisableVerticalSyncBit            EQU        1
  228. kDisableCompositeSyncBit        EQU        2
  229. kEnableSyncOnBlue                EQU        3
  230. kEnableSyncOnGreen                EQU        4
  231. kEnableSyncOnRed                EQU        5
  232. kNoSeparateSyncControlBit        EQU        6
  233. kHorizontalSyncMask                EQU        $01
  234. kVerticalSyncMask                EQU        $02
  235. kCompositeSyncMask                EQU        $04
  236. kDPMSSyncMask                    EQU        $7
  237. kSyncOnBlueMask                    EQU        $08
  238. kSyncOnGreenMask                EQU        $10
  239. kSyncOnRedMask                    EQU        $20
  240. kSyncOnMask                        EQU        $38
  241.  
  242. ;    Power Mode constants for translating DPMS modes to Get/SetSync calls.    
  243. kDPMSSyncOn                        EQU        0
  244. kDPMSSyncStandby                EQU        1
  245. kDPMSSyncSuspend                EQU        2
  246. kDPMSSyncOff                    EQU        7
  247.  
  248. kConvolved                        EQU        0
  249. kLiveVideoPassThru                EQU        1
  250. kConvolvedMask                    EQU        $01
  251. kLiveVideoPassThruMask            EQU        $02
  252.  
  253. VPBlock                 RECORD    0
  254. vpBaseOffset             ds.l   1        ; offset: $0 (0)        ;Offset to page zero of video RAM (From minorBaseOS).
  255. vpRowBytes                 ds.w   1        ; offset: $4 (4)        ;Width of each row of video memory.
  256. vpBounds                 ds     Rect    ; offset: $6 (6)        ;BoundsRect for the video display (gives dimensions).
  257. vpVersion                 ds.w   1        ; offset: $E (14)        ;PixelMap version number.
  258. vpPackType                 ds.w   1        ; offset: $10 (16)
  259. vpPackSize                 ds.l   1        ; offset: $12 (18)
  260. vpHRes                     ds.l   1        ; offset: $16 (22)        ;Horizontal resolution of the device (pixels per inch).
  261. vpVRes                     ds.l   1        ; offset: $1A (26)        ;Vertical resolution of the device (pixels per inch).
  262. vpPixelType                 ds.w   1        ; offset: $1E (30)        ;Defines the pixel type.
  263. vpPixelSize                 ds.w   1        ; offset: $20 (32)        ;Number of bits in pixel.
  264. vpCmpCount                 ds.w   1        ; offset: $22 (34)        ;Number of components in pixel.
  265. vpCmpSize                 ds.w   1        ; offset: $24 (36)        ;Number of bits per component
  266. vpPlaneBytes             ds.l   1        ; offset: $26 (38)        ;Offset from one plane to the next.
  267. sizeof                     EQU *            ; size:   $2A (42)
  268.                         ENDR
  269.  
  270. ; typedef struct VPBlock     VPBlock
  271. ; typedef VPBlock             *VPBlockPtr
  272. VDEntryRecord             RECORD    0
  273. csTable                     ds.l   1        ; offset: $0 (0)        ;(long) pointer to color table entry=value, r,g,b:INTEGER
  274. sizeof                     EQU *            ; size:   $4 (4)
  275.                         ENDR
  276.  
  277. ; typedef struct VDEntryRecord  VDEntryRecord
  278. ; typedef VDEntryRecord     *VDEntRecPtr
  279. ; Parm block for SetGray control call 
  280. VDGrayRecord             RECORD    0
  281. csMode                     ds.b   1        ; offset: $0 (0)        ;Same as GDDevType value (0=color, 1=mono)
  282. filler                     ds.b   1        ; offset: $1 (1)
  283. sizeof                     EQU *            ; size:   $2 (2)
  284.                         ENDR
  285.  
  286. ; typedef struct VDGrayRecord  VDGrayRecord
  287. ; typedef VDGrayRecord         *VDGrayPtr
  288. ; Parm block for SetInterrupt call 
  289. VDFlagRecord             RECORD    0
  290. csMode                     ds.b   1        ; offset: $0 (0)
  291. filler                     ds.b   1        ; offset: $1 (1)
  292. sizeof                     EQU *            ; size:   $2 (2)
  293.                         ENDR
  294.  
  295. ; typedef struct VDFlagRecord  VDFlagRecord
  296. ; typedef VDFlagRecord         *VDFlagRecPtr
  297. ; Parm block for SetEntries control call 
  298. VDSetEntryRecord         RECORD    0
  299. csTable                     ds.l   1        ; offset: $0 (0)        ;Pointer to an array of color specs
  300. csStart                     ds.w   1        ; offset: $4 (4)        ;Which spec in array to start with, or -1
  301. csCount                     ds.w   1        ; offset: $6 (6)        ;Number of color spec entries to set
  302. sizeof                     EQU *            ; size:   $8 (8)
  303.                         ENDR
  304.  
  305. ; typedef struct VDSetEntryRecord  VDSetEntryRecord
  306. ; typedef VDSetEntryRecord     *VDSetEntryPtr
  307. ; Parm block for SetGamma control call 
  308. VDGammaRecord             RECORD    0
  309. csGTable                 ds.l   1        ; offset: $0 (0)        ;pointer to gamma table
  310. sizeof                     EQU *            ; size:   $4 (4)
  311.                         ENDR
  312.  
  313. ; typedef struct VDGammaRecord  VDGammaRecord
  314. ; typedef VDGammaRecord     *VDGamRecPtr
  315. VDBaseAddressInfoRec     RECORD    0
  316. csDevData                 ds.l   1        ; offset: $0 (0)        ; LONGINT - (long) timing mode 
  317. csDevBase                 ds.l   1        ; offset: $4 (4)        ; LONGINT - (long) base address of the mode 
  318. csModeReserved             ds.w   1        ; offset: $8 (8)        ; INTEGER - (short) will some day be the depth 
  319. csModeBase                 ds.l   1        ; offset: $A (10)        ; LONGINT - (long) reserved 
  320. sizeof                     EQU *            ; size:   $E (14)
  321.                         ENDR
  322.  
  323. ; typedef struct VDBaseAddressInfoRec  VDBaseAddressInfoRec, *VDBaseAddressInfoPtr
  324. VDSwitchInfoRec         RECORD    0
  325. csMode                     ds.w   1        ; offset: $0 (0)        ;(word) mode depth
  326. csData                     ds.l   1        ; offset: $2 (2)        ;(long) functional sResource of mode
  327. csPage                     ds.w   1        ; offset: $6 (6)        ;(word) page to switch in
  328. csBaseAddr                 ds.l   1        ; offset: $8 (8)        ;(long) base address of page (return value)
  329. csReserved                 ds.l   1        ; offset: $C (12)        ;(long) Reserved (set to 0) 
  330. sizeof                     EQU *            ; size:   $10 (16)
  331.                         ENDR
  332.  
  333. ; typedef struct VDSwitchInfoRec  VDSwitchInfoRec
  334. ; typedef VDSwitchInfoRec     *VDSwitchInfoPtr
  335. VDTimingInfoRec         RECORD    0
  336. csTimingMode             ds.l   1        ; offset: $0 (0)        ; LONGINT - (long) timing mode (a la InitGDevice) 
  337. csTimingReserved         ds.l   1        ; offset: $4 (4)        ; LONGINT - (long) reserved 
  338. csTimingFormat             ds.l   1        ; offset: $8 (8)        ; LONGINT - (long) what format is the timing info 
  339. csTimingData             ds.l   1        ; offset: $C (12)        ; LONGINT - (long) data supplied by driver 
  340. csTimingFlags             ds.l   1        ; offset: $10 (16)        ; LONGINT - (long) mode within device 
  341. sizeof                     EQU *            ; size:   $14 (20)
  342.                         ENDR
  343.  
  344. ; typedef struct VDTimingInfoRec  VDTimingInfoRec
  345. ; typedef VDTimingInfoRec     *VDTimingInfoPtr
  346. VDDisplayConnectInfoRec RECORD    0
  347. csDisplayType             ds.w   1        ; offset: $0 (0)        ; INTEGER - (word) Type of display connected 
  348. csConnectTaggedType         ds.b   1        ; offset: $2 (2)        ; BYTE - type of tagging 
  349. csConnectTaggedData         ds.b   1        ; offset: $3 (3)        ; BYTE - tagging data 
  350. csConnectFlags             ds.l   1        ; offset: $4 (4)        ; LONGINT - (long) tell us about the connection 
  351. csDisplayComponent         ds.l   1        ; offset: $8 (8)        ; LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) 
  352. csConnectReserved         ds.l   1        ; offset: $C (12)        ; LONGINT - (long) reserved 
  353. sizeof                     EQU *            ; size:   $10 (16)
  354.                         ENDR
  355.  
  356. ; typedef struct VDDisplayConnectInfoRec  VDDisplayConnectInfoRec
  357. ; typedef VDDisplayConnectInfoRec  *VDDisplayConnectInfoPtr
  358. ; RawSenseCode
  359. ;    This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  360. ;    for the possible raw sense code values when 'standard' sense code hardware is implemented.
  361. ;
  362. ;    For 'standard' sense code hardware, the raw sense is obtained as follows:
  363. ;        • Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  364. ;        • Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  365. ;
  366. ;    IMPORTANT Note: 
  367. ;    When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  368. ;    are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  369. ;
  370. ;
  371. ; typedef unsigned char     RawSenseCode
  372.  
  373. kRSCZero                        EQU        0
  374. kRSCOne                            EQU        1
  375. kRSCTwo                            EQU        2
  376. kRSCThree                        EQU        3
  377. kRSCFour                        EQU        4
  378. kRSCFive                        EQU        5
  379. kRSCSix                            EQU        6
  380. kRSCSeven                        EQU        7
  381.  
  382. ; ExtendedSenseCode
  383. ;    This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  384. ;    for the values which are possible when the extended sense algorithm is applied to hardware
  385. ;    which implements 'standard' sense code hardware.
  386. ;
  387. ;     For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  388. ;    (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  389. ;        • Drive sense line 'A' low and read the values of 'B' and 'C'.  
  390. ;        • Drive sense line 'B' low and read the values of 'A' and 'C'.
  391. ;        • Drive sense line 'C' low and read the values of 'A' and 'B'.
  392. ;
  393. ;    In this way, a six-bit number of the form BC/AC/AB is generated. 
  394. ;
  395. ;    IMPORTANT Note: 
  396. ;    When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  397. ;    are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  398. ;
  399. ;
  400. ; typedef unsigned char     ExtendedSenseCode
  401.  
  402. kESCZero21Inch                    EQU        $00                    ; 21" RGB                                 
  403. kESCOnePortraitMono                EQU        $14                    ; Portrait Monochrome                     
  404. kESCTwo12Inch                    EQU        $21                    ; 12" RGB                                
  405. kESCThree21InchRadius            EQU        $31                    ; 21" RGB (Radius)                        
  406. kESCThree21InchMonoRadius        EQU        $34                    ; 21" Monochrome (Radius)                 
  407. kESCThree21InchMono                EQU        $35                    ; 21" Monochrome                        
  408. kESCFourNTSC                    EQU        $0A                    ; NTSC                                 
  409. kESCFivePortrait                EQU        $1E                    ; Portrait RGB                         
  410. kESCSixMSB1                        EQU        $03                    ; MultiScan Band-1 (12" thru 1Six")    
  411. kESCSixMSB2                        EQU        $0B                    ; MultiScan Band-2 (13" thru 19")        
  412. kESCSixMSB3                        EQU        $23                    ; MultiScan Band-3 (13" thru 21")        
  413. kESCSixStandard                    EQU        $2B                    ; 13"/14" RGB or 12" Monochrome        
  414. kESCSevenPAL                    EQU        $00                    ; PAL                                    
  415. kESCSevenNTSC                    EQU        $14                    ; NTSC                                 
  416. kESCSevenVGA                    EQU        $17                    ; VGA                                     
  417. kESCSeven16Inch                    EQU        $2D                    ; 16" RGB (GoldFish)                      
  418. kESCSevenPALAlternate            EQU        $30                    ; PAL (Alternate)                         
  419. kESCSeven19Inch                    EQU        $3A                    ; Third-Party 19”                        
  420. kESCSevenNoDisplay                EQU        $3F                    ; No display connected                 
  421.  
  422. ; DepthMode
  423. ;    This abstract data type is used to to reference RELATIVE pixel depths.
  424. ;    Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  425. ;
  426. ;    Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  427. ;    graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  428. ;    hardware, 'kDepthMode1' may represent 8BPP.
  429. ;
  430. ;    DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  431. ;    behave as expected.  The values of the constants which comprise the set are such
  432. ;    that 'kDepthMode4 < kDepthMode6' behaves as expected.
  433. ;
  434. ; typedef unsigned short     DepthMode
  435.  
  436. kDepthMode1                        EQU        128
  437. kDepthMode2                        EQU        129
  438. kDepthMode3                        EQU        130
  439. kDepthMode4                        EQU        131
  440. kDepthMode5                        EQU        132
  441. kDepthMode6                        EQU        133
  442.  
  443. kFirstDepthMode                    EQU        128                    ; These constants are obsolete, and just included    
  444. kSecondDepthMode                EQU        129                    ; for clients that have converted to the above        
  445. kThirdDepthMode                    EQU        130                    ; kDepthModeXXX constants.                            
  446. kFourthDepthMode                EQU        131
  447. kFifthDepthMode                    EQU        132
  448. kSixthDepthMode                    EQU        133
  449.  
  450. VDPageInfo                 RECORD    0
  451. csMode                     ds.w   1        ; offset: $0 (0)        ;(word) mode within device
  452. csData                     ds.l   1        ; offset: $2 (2)        ;(long) data supplied by driver
  453. csPage                     ds.w   1        ; offset: $6 (6)        ;(word) page to switch in
  454. csBaseAddr                 ds.l   1        ; offset: $8 (8)        ;(long) base address of page
  455. sizeof                     EQU *            ; size:   $C (12)
  456.                         ENDR
  457.  
  458. ; typedef struct VDPageInfo  VDPageInfo
  459. ; typedef VDPageInfo         *VDPgInfoPtr
  460. VDSizeInfo                 RECORD    0
  461. csHSize                     ds.w   1        ; offset: $0 (0)        ;(word) desired/returned h size
  462. csHPos                     ds.w   1        ; offset: $2 (2)        ;(word) desired/returned h position
  463. csVSize                     ds.w   1        ; offset: $4 (4)        ;(word) desired/returned v size
  464. csVPos                     ds.w   1        ; offset: $6 (6)        ;(word) desired/returned v position
  465. sizeof                     EQU *            ; size:   $8 (8)
  466.                         ENDR
  467.  
  468. ; typedef struct VDSizeInfo  VDSizeInfo
  469. ; typedef VDSizeInfo         *VDSzInfoPtr
  470. VDSettings                 RECORD    0
  471. csParamCnt                 ds.w   1        ; offset: $0 (0)        ;(word) number of params
  472. csBrightMax                 ds.w   1        ; offset: $2 (2)        ;(word) max brightness
  473. csBrightDef                 ds.w   1        ; offset: $4 (4)        ;(word) default brightness
  474. csBrightVal                 ds.w   1        ; offset: $6 (6)        ;(word) current brightness
  475. csCntrstMax                 ds.w   1        ; offset: $8 (8)        ;(word) max contrast
  476. csCntrstDef                 ds.w   1        ; offset: $A (10)        ;(word) default contrast
  477. csCntrstVal                 ds.w   1        ; offset: $C (12)        ;(word) current contrast
  478. csTintMax                 ds.w   1        ; offset: $E (14)        ;(word) max tint
  479. csTintDef                 ds.w   1        ; offset: $10 (16)        ;(word) default tint
  480. csTintVal                 ds.w   1        ; offset: $12 (18)        ;(word) current tint
  481. csHueMax                 ds.w   1        ; offset: $14 (20)        ;(word) max hue
  482. csHueDef                 ds.w   1        ; offset: $16 (22)        ;(word) default hue
  483. csHueVal                 ds.w   1        ; offset: $18 (24)        ;(word) current hue
  484. csHorizDef                 ds.w   1        ; offset: $1A (26)        ;(word) default horizontal
  485. csHorizVal                 ds.w   1        ; offset: $1C (28)        ;(word) current horizontal
  486. csHorizMax                 ds.w   1        ; offset: $1E (30)        ;(word) max horizontal
  487. csVertDef                 ds.w   1        ; offset: $20 (32)        ;(word) default vertical
  488. csVertVal                 ds.w   1        ; offset: $22 (34)        ;(word) current vertical
  489. csVertMax                 ds.w   1        ; offset: $24 (36)        ;(word) max vertical
  490. sizeof                     EQU *            ; size:   $26 (38)
  491.                         ENDR
  492.  
  493. ; typedef struct VDSettings  VDSettings
  494. ; typedef VDSettings         *VDSettingsPtr
  495. VDDefMode                 RECORD    0
  496. csID                     ds.b   1        ; offset: $0 (0)
  497. filler                     ds.b   1        ; offset: $1 (1)
  498. sizeof                     EQU *            ; size:   $2 (2)
  499.                         ENDR
  500.  
  501. ; typedef struct VDDefMode     VDDefMode
  502. ; typedef VDDefMode         *VDDefModePtr
  503. VDSyncInfoRec             RECORD    0
  504. csMode                     ds.b   1        ; offset: $0 (0)
  505. csFlags                     ds.b   1        ; offset: $1 (1)
  506. sizeof                     EQU *            ; size:   $2 (2)
  507.                         ENDR
  508.  
  509. ; typedef struct VDSyncInfoRec  VDSyncInfoRec
  510. ; typedef VDSyncInfoRec     *VDSyncInfoPtr
  511. ; typedef unsigned long     DisplayModeID
  512. ; typedef unsigned long     VideoDeviceType
  513. ; typedef unsigned long     GammaTableID
  514. ; Constants for the GetNextResolution call 
  515.  
  516. kDisplayModeIDCurrent            EQU        $0                    ; Reference the Current DisplayModeID 
  517. kDisplayModeIDInvalid            EQU        $ffffffff            ; A bogus DisplayModeID in all cases 
  518. kDisplayModeIDFindFirstResolution EQU        $fffffffe            ; Used in cscGetNextResolution to reset iterator 
  519. kDisplayModeIDNoMoreResolutions    EQU        $fffffffd            ; Used in cscGetNextResolution to indicate End Of List 
  520.  
  521. ; Constants for the GetGammaInfoList call 
  522. kGammaTableIDFindFirst            EQU        $fffffffe            ; Get the first gamma table ID 
  523. kGammaTableIDNoMoreTables        EQU        $fffffffd            ; Used to indicate end of list 
  524. kGammaTableIDSpecific            EQU        $0                    ; Return the info for the given table id 
  525.  
  526. VDResolutionInfoRec     RECORD    0
  527. csPreviousDisplayModeID     ds.l   1        ; offset: $0 (0)        ; ID of the previous resolution in a chain 
  528. csDisplayModeID             ds.l   1        ; offset: $4 (4)        ; ID of the next resolution 
  529. csHorizontalPixels         ds.l   1        ; offset: $8 (8)        ; # of pixels in a horizontal line at the max depth 
  530. csVerticalLines             ds.l   1        ; offset: $C (12)        ; # of lines in a screen at the max depth 
  531. csRefreshRate             ds.l   1        ; offset: $10 (16)        ; Vertical Refresh Rate in Hz 
  532. csMaxDepthMode             ds.w   1        ; offset: $14 (20)        ; 0x80-based number representing max bit depth 
  533. csResolutionFlags         ds.l   1        ; offset: $16 (22)        ; Reserved - flag bits 
  534. csReserved                 ds.l   1        ; offset: $1A (26)        ; Reserved 
  535. sizeof                     EQU *            ; size:   $1E (30)
  536.                         ENDR
  537.  
  538. ; typedef struct VDResolutionInfoRec  VDResolutionInfoRec
  539. ; typedef VDResolutionInfoRec  *VDResolutionInfoPtr
  540. VDVideoParametersInfoRec RECORD    0
  541. csDisplayModeID             ds.l   1        ; offset: $0 (0)        ; the ID of the resolution we want info on 
  542. csDepthMode                 ds.w   1        ; offset: $4 (4)        ; The bit depth we want the info on (0x80 based) 
  543. csVPBlockPtr             ds.l   1        ; offset: $6 (6)        ; Pointer to a video parameter block 
  544. csPageCount                 ds.l   1        ; offset: $A (10)        ; Number of pages supported by the resolution 
  545. csDeviceType             ds.l   1        ; offset: $E (14)        ; Device Type:  Direct, Fixed or CLUT; 
  546. csReserved                 ds.l   1        ; offset: $12 (18)        ; Reserved 
  547. sizeof                     EQU *            ; size:   $16 (22)
  548.                         ENDR
  549.  
  550. ; typedef struct VDVideoParametersInfoRec  VDVideoParametersInfoRec
  551. ; typedef VDVideoParametersInfoRec  *VDVideoParametersInfoPtr
  552. VDGammaInfoRec             RECORD    0
  553. csLastGammaID             ds.l   1        ; offset: $0 (0)        ; the ID of the previous gamma table 
  554. csNextGammaID             ds.l   1        ; offset: $4 (4)        ; the ID of the next gamma table 
  555. csGammaPtr                 ds.l   1        ; offset: $8 (8)        ; Ptr to a gamma table data 
  556. csReserved                 ds.l   1        ; offset: $C (12)        ; Reserved 
  557. sizeof                     EQU *            ; size:   $10 (16)
  558.                         ENDR
  559.  
  560. ; typedef struct VDGammaInfoRec  VDGammaInfoRec
  561. ; typedef VDGammaInfoRec     *VDGammaInfoPtr
  562. VDGetGammaListRec         RECORD    0
  563. csPreviousGammaTableID     ds.l   1        ; offset: $0 (0)        ; ID of the previous gamma table 
  564. csGammaTableID             ds.l   1        ; offset: $4 (4)        ; ID of the gamma table following csPreviousDisplayModeID 
  565. csGammaTableSize         ds.l   1        ; offset: $8 (8)        ; Size of the gamma table in bytes 
  566. csGammaTableName         ds.l   1        ; offset: $C (12)        ; Gamma table name (c-string) 
  567. sizeof                     EQU *            ; size:   $10 (16)
  568.                         ENDR
  569.  
  570. ; typedef struct VDGetGammaListRec  VDGetGammaListRec
  571. ; typedef VDGetGammaListRec  *VDGetGammaListPtr
  572. VDRetrieveGammaRec         RECORD    0
  573. csGammaTableID             ds.l   1        ; offset: $0 (0)        ; ID of gamma table to retrieve 
  574. csGammaTablePtr             ds.l   1        ; offset: $4 (4)        ; Location to copy desired gamma to 
  575. sizeof                     EQU *            ; size:   $8 (8)
  576.                         ENDR
  577.  
  578. ; typedef struct VDRetrieveGammaRec  VDRetrieveGammaRec
  579. ; typedef VDRetrieveGammaRec  *VDRetrieveGammaPtr
  580. VDSetHardwareCursorRec     RECORD    0
  581. csCursorRef                 ds.l   1        ; offset: $0 (0)        ; reference to cursor data 
  582. csReserved1                 ds.l   1        ; offset: $4 (4)        ; reserved for future use 
  583. csReserved2                 ds.l   1        ; offset: $8 (8)        ; should be ignored 
  584. sizeof                     EQU *            ; size:   $C (12)
  585.                         ENDR
  586.  
  587. ; typedef struct VDSetHardwareCursorRec  VDSetHardwareCursorRec
  588. ; typedef VDSetHardwareCursorRec  *VDSetHardwareCursorPtr
  589. VDDrawHardwareCursorRec RECORD    0
  590. csCursorX                 ds.l   1        ; offset: $0 (0)        ; x coordinate 
  591. csCursorY                 ds.l   1        ; offset: $4 (4)        ; y coordinate 
  592. csCursorVisible             ds.l   1        ; offset: $8 (8)        ; true if cursor is must be visible 
  593. csReserved1                 ds.l   1        ; offset: $C (12)        ; reserved for future use 
  594. csReserved2                 ds.l   1        ; offset: $10 (16)        ; should be ignored 
  595. sizeof                     EQU *            ; size:   $14 (20)
  596.                         ENDR
  597.  
  598. ; typedef struct VDDrawHardwareCursorRec  VDDrawHardwareCursorRec
  599. ; typedef VDDrawHardwareCursorRec  *VDDrawHardwareCursorPtr
  600. VDSupportsHardwareCursorRec RECORD    0
  601. csSupportsHardwareCursor ds.l   1        ; offset: $0 (0)
  602. ; true if hardware cursor is supported 
  603. csReserved1                 ds.l   1        ; offset: $4 (4)        ; reserved for future use 
  604. csReserved2                 ds.l   1        ; offset: $8 (8)        ; must be zero 
  605. sizeof                     EQU *            ; size:   $C (12)
  606.                         ENDR
  607.  
  608. ; typedef struct VDSupportsHardwareCursorRec  VDSupportsHardwareCursorRec
  609. ; typedef VDSupportsHardwareCursorRec  *VDSupportsHardwareCursorPtr
  610. VDHardwareCursorDrawStateRec RECORD    0
  611. csCursorX                 ds.l   1        ; offset: $0 (0)        ; x coordinate 
  612. csCursorY                 ds.l   1        ; offset: $4 (4)        ; y coordinate 
  613. csCursorVisible             ds.l   1        ; offset: $8 (8)        ; true if cursor is visible 
  614. csCursorSet                 ds.l   1        ; offset: $C (12)        ; true if cursor successfully set by last set control call 
  615. csReserved1                 ds.l   1        ; offset: $10 (16)        ; reserved for future use 
  616. csReserved2                 ds.l   1        ; offset: $14 (20)        ; must be zero 
  617. sizeof                     EQU *            ; size:   $18 (24)
  618.                         ENDR
  619.  
  620. ; typedef struct VDHardwareCursorDrawStateRec  VDHardwareCursorDrawStateRec
  621. ; typedef VDHardwareCursorDrawStateRec  *VDHardwareCursorDrawStatePtr
  622. VDConvolutionInfoRec     RECORD    0
  623. csDisplayModeID             ds.l   1        ; offset: $0 (0)        ; the ID of the resolution we want info on 
  624. csDepthMode                 ds.w   1        ; offset: $4 (4)        ; The bit depth we want the info on (0x80 based) 
  625. csPage                     ds.l   1        ; offset: $6 (6)
  626. csFlags                     ds.l   1        ; offset: $A (10)
  627. csReserved                 ds.l   1        ; offset: $E (14)
  628. sizeof                     EQU *            ; size:   $12 (18)
  629.                         ENDR
  630.  
  631. ; typedef struct VDConvolutionInfoRec  VDConvolutionInfoRec
  632. ; typedef VDConvolutionInfoRec  *VDConvolutionInfoPtr
  633. VDPowerStateRec         RECORD    0
  634. powerState                 ds.l   1        ; offset: $0 (0)
  635. powerFlags                 ds.l   1        ; offset: $4 (4)
  636. powerReserved1             ds.l   1        ; offset: $8 (8)
  637. powerReserved2             ds.l   1        ; offset: $C (12)
  638. sizeof                     EQU *            ; size:   $10 (16)
  639.                         ENDR
  640.  
  641. ; typedef struct VDPowerStateRec  VDPowerStateRec
  642. ; typedef VDPowerStateRec     *VDPowerStatePtr
  643.     ENDIF ; __VIDEO__
  644.